import request from '@/utils/request'

// 查询户主管理列表
export function listHomeowners(query) {
  return request({
    url: '/homeowners/homeowners/list',
    method: 'get',
    params: query
  })
}

// 查询户主管理详细
export function getHomeowners(homeownerId) {
  return request({
    url: '/homeowners/homeowners/' + homeownerId,
    method: 'get'
  })
}

// 新增户主管理
export function addHomeowners(data) {
  return request({
    url: '/homeowners/homeowners',
    method: 'post',
    data: data
  })
}

// 修改户主管理
export function updateHomeowners(data) {
  return request({
    url: '/homeowners/homeowners',
    method: 'put',
    data: data
  })
}

// 删除户主管理
export function delHomeowners(homeownerId) {
  return request({
    url: '/homeowners/homeowners/' + homeownerId,
    method: 'delete'
  })
}
